import {
  BrowserRouter as Router,
  // Link,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom'
import Layout from './pages/Layout'
import Login from './pages/Login'
import Non from './pages/Non'
function App() {
  return (
    // 配置路由
    <Router>
      <div className="App">
        {/* <Link to="/layout">去首页</Link>
        <Link to="/login">去登录页面</Link> */}
        <Switch>
          <Redirect from="/" to="/login" exact></Redirect>
          <Route path="/login" component={Login}></Route>
          <Route path="/layout" component={Layout}></Route>
          <Route component={Non}></Route>
        </Switch>
      </div>
    </Router>
  )
}

export default App
